import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
// import classifyView from '../views/classifyView.vue'
import RankingView from '../views/RankingView.vue'
import renewView from '../views/renewView.vue'
import micenterView from '../views/micenterView.vue'
import detailsView from '../views/detailsView.vue'
import readView from '../views/readView.vue'

Vue.use(VueRouter)

const routes = [
  // 主页
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/home',
    name: 'home',
    component:HomeView
  },
  // 分类页面
  {
    path: '/classify',
    name: 'classify',
    // component:classifyView
    component:()=>import('../views/classifyView.vue')

  },
  // 排行页面
  {
    path: '/Ranking',
    name: 'Ranking',
    component:RankingView
  },
  // 更新页面
  {
    path: '/renew',
    name: 'renew',
    component:renewView
  },
  // 个人中心
  {
    path: '/micenter',
    name: 'micenter',
    component:micenterView
  },
  // 详情页
  {
    path: '/details',
    name: 'details',
    component:detailsView
  },
  // 阅读页
  {
    path: '/read',
    name: 'read',
    component:readView
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
